package cn.article.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import cn.easier.club.base.annotation.ExcelAnalysis;
import cn.easier.club.base.annotation.IsNeeded;


/**
 * 物流信息表
 * 
 * @author lixiaopeng
 *
 */
@Entity
@Table(name = "article_info")
@JsonIgnoreProperties(ignoreUnknown = true)
public class ArticleInfo implements Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Integer aid;

	/**
	 * 产品编码
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(100)", nullable = false)
	private String articleNum;

	/**
	 * 产品名称
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(100)", nullable = false)
	private String articleName;

	/**
	 * 产品数量
	 */
	@IsNeeded
	@Column(columnDefinition = "INT", nullable = false)
	private Integer articleCount;

	/**
	 * 物品质量
	 */
	@ExcelAnalysis(convertClass = ArticleQualityConverter.class)
	@IsNeeded
	@Column(columnDefinition = "INT", nullable = false)
	private ArticleQuality articleQuality;

	/**
	 * 发货省
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(20)", nullable = false)
	private String sendProvince;

	/**
	 * 发货市
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(20)", nullable = false)
	private String sendCity;

	/**
	 * 发货地址
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(100)", nullable = false)
	private String sendAdress;

	/**
	 * 中心仓
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(20)", nullable = false)
	private String centerStore;

	/**
	 * 省仓名称
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(20)",nullable = false)
	private String provinceStore;

	/**
	 * 到货省
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(20)", nullable = false)
	private String getProvince;

	/**
	 * 到货市
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(20)", nullable = false)
	private String getCity;

	/**
	 * 到货地址
	 */
	@IsNeeded
	@Column(columnDefinition = "VARCHAR(100)", nullable = false)
	private String getAdress;

	/**
	 * 客户类型
	 */
	@ExcelAnalysis(convertClass = CustomerTypeConverter.class)
	@IsNeeded
	@Column(columnDefinition = "INT", nullable = false)
	private CustomerType getCustomerType;

	/**
	 * 物流状态
	 */
	@ExcelAnalysis(convertClass = LogisticsStatusConverter.class)
	@IsNeeded
	@Column(columnDefinition = "INT", nullable = false)
	private LogisticsStatus logisticsStatus;

	/**
	 * 添加数据时间
	 */
	@IsNeeded
	@Column(columnDefinition = "DATETIME",nullable = false)
	@Temporal(TemporalType.DATE)
	private Date createTime;

	public Integer getAid() {
		return aid;
	}

	public void setAid(Integer aid) {
		this.aid = aid;
	}

	public String getArticleNum() {
		return articleNum;
	}

	public void setArticleNum(String articleNum) {
		this.articleNum = articleNum;
	}

	public String getArticleName() {
		return articleName;
	}

	public void setArticleName(String articleName) {
		this.articleName = articleName;
	}

	public Integer getArticleCount() {
		return articleCount;
	}

	public void setArticleCount(Integer articleCount) {
		this.articleCount = articleCount;
	}

	public ArticleQuality getArticleQuality() {
		return articleQuality;
	}

	public void setArticleQuality(ArticleQuality articleQuality) {
		this.articleQuality = articleQuality;
	}

	public String getSendProvince() {
		return sendProvince;
	}

	public void setSendProvince(String sendProvince) {
		this.sendProvince = sendProvince;
	}

	public String getSendCity() {
		return sendCity;
	}

	public void setSendCity(String sendCity) {
		this.sendCity = sendCity;
	}

	public String getSendAdress() {
		return sendAdress;
	}

	public void setSendAdress(String sendAdress) {
		this.sendAdress = sendAdress;
	}

	public String getCenterStore() {
		return centerStore;
	}

	public void setCenterStore(String centerStore) {
		this.centerStore = centerStore;
	}

	public String getProvinceStore() {
		return provinceStore;
	}

	public void setProvinceStore(String provinceStore) {
		this.provinceStore = provinceStore;
	}

	public String getGetProvince() {
		return getProvince;
	}

	public void setGetProvince(String getProvince) {
		this.getProvince = getProvince;
	}

	public String getGetCity() {
		return getCity;
	}

	public void setGetCity(String getCity) {
		this.getCity = getCity;
	}

	public String getGetAdress() {
		return getAdress;
	}

	public void setGetAdress(String getAdress) {
		this.getAdress = getAdress;
	}

	public CustomerType getGetCustomerType() {
		return getCustomerType;
	}

	public void setGetCustomerType(CustomerType getCustomerType) {
		this.getCustomerType = getCustomerType;
	}

	public LogisticsStatus getLogisticsStatus() {
		return logisticsStatus;
	}

	public void setLogisticsStatus(LogisticsStatus logisticsStatus) {
		this.logisticsStatus = logisticsStatus;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	public String toString() {
		return "ArticleInfo [aid=" + aid + ", articleNum=" + articleNum + ", articleName=" + articleName
				+ ", articleCount=" + articleCount + ", articleQuality=" + articleQuality + ", sendProvince="
				+ sendProvince + ", sendCity=" + sendCity + ", sendAdress=" + sendAdress + ", centerStore="
				+ centerStore + ", provinceStore=" + provinceStore + ", getProvince=" + getProvince + ", getCity="
				+ getCity + ", getAdress=" + getAdress + ", getCustomerType=" + getCustomerType + ", logisticsStatus="
				+ logisticsStatus + ", createTime=" + createTime + "]";
	}
	
}
